System virtual machines (VM) are capable of virtualizing a full set of hardware resources, including a processor or processors, memory, storage resources, and peripheral devices. A virtual machine monitor (VMM) or hypervisor may be software and/or hardware that manages one or more virtual machines.
VMs may be used to run more than one instance of an operating system and application software stack on a single physical machine, where the VM and physical machine share a common hardware architecture. This use of VMs is driven by the desire to consolidate many less-capable physical machines onto a single more-capable physical machine, generally to reduce operational costs by multiplexing more virtual resources than there are physical resources, this is known as oversubscription.
For example, a physical machine containing a single physical CPU may host several VMs, each of which may be allocated a virtual CPU. The clock cycles of the physical CPU, during which the CPU executes some number of instructions, are divided between the virtual CPUs such that the sum of all clock cycles consumed by the set of virtual CPUs is less than or equal to the clock cycle rate of the physical CPU. Over-subscription of network interfaces is similar in that the sum of network frames sent and received by the set of all virtual interfaces is less than or equal to the frame rate of the physical interface.
CPUs and network interfaces share the characteristic of being temporally divisible, i.e. a CPU has an operating frequency, during which a fixed number of instructions can be executed during a unit of time, and a network interface has a transmission rate, during which a fixed number of frames may be sent and received during a unit of time. Multiplexing devices that have this characteristic is simply a matter of dividing up the time slices of the physical device among one or more virtual devices, and over-subscription is achieved through having more than one virtual device per physical device.
Random Access Memory (RAM) may be multiplexed or oversubscribed but in a different manner than CPUs or network interfaces. Generally, it is more difficult to multiplex RAM since it is shared between different consumers along a spatial dimension.
An example of a known memory management technique involves moving VM data out of RAM to some other form of storage, and then bringing the data back into RAM when it is required by the VM. Another example of a known virtual machine memory management technique is “ballooning”. Generally, a virtual machine manager running on a host machine can request that a guest VM increase (“inflate”) or reduce (“deflate”) its memory footprint. The guest VM can choose to accept or ignore this request. The host machine, in contrast, has no direct control over the memory usage of the guest virtual machine other than to request that it inflate or deflate its memory footprint.